package com.neuedu.hw_20190215;

public class EnglishDepartment extends Student {
    //成员变量
    private Double lectureScore;
    private Double finalExam;
    private Double middleExam;

    //行为方法


    public Double totalscore() {
        Double myTotalScore = lectureScore*0.5+finalExam*0.25+middleExam*0.25;
        return (double)Math.round(myTotalScore*100)/100;
    }


    //自定义构造方法

    public EnglishDepartment(String stuID, String stuName, String strSex, int stuAge,  Double lectureScore, Double finalExam, Double middleExam) {
        super(stuID, stuName, strSex, stuAge);
        this.lectureScore = lectureScore;
        this.finalExam = finalExam;
        this.middleExam = middleExam;
    }


    //默认构造方法

    public EnglishDepartment() {
    }

    //为私有成员变量提供setter和getter方法

    public Double getLectureScore() {
        return lectureScore;
    }

    public void setLectureScore(Double lectureScore) {
        this.lectureScore = lectureScore;
    }

    public Double getFinalExam() {
        return finalExam;
    }

    public void setFinalExam(Double finalExam) {
        this.finalExam = finalExam;
    }

    public Double getMiddleExam() {
        return middleExam;
    }

    public void setMiddleExam(Double middleExam) {
        this.middleExam = middleExam;
    }
}
